package com.cloudfun.campusshare.common.model.vo;

import com.cloudfun.campusshare.common.constant.BaseConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * Created by Huqin on 2019/12/24
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "账号附加信息")
public class UserAdditionInfoVO {

    @ApiModelProperty(value = "手机号")
    @NotEmpty(message = "手机号不能为空")
    @Pattern(regexp = BaseConstant.PHONE_REGEX_PATTERN, message = "手机号错误")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    @NotEmpty(message = "邮箱不能为空")
    @Length(min = 2, max = 40, message = "邮箱限制2-40个字")
    @Pattern(regexp = BaseConstant.EMAIL_REGEX_PATTERN, message = "用户名错误")
    private String email;

    @ApiModelProperty("企业名称")
    @NotEmpty(message = "企业名称不能为空")
    @Length(min = 2, max = 12, message = "企业名称限制2-12个字")
    private String enterpriseName;

}
